<template>
  <div class="table-container">
    <p class="title">列宽度width="50%"，百分比没有生效，把当成50px处理了</p>
    <el-table :data="tableData" border>
      <el-table-column prop="id" label="ID" width="50%" show-overflow-tooltip />
      <el-table-column
        prop="name"
        label="Name"
        width="50%"
        show-overflow-tooltip
      />
    </el-table>
    <p class="title">
      列宽度min-width值"50%"、50px"、50，效果一样。都是以各个列之间的差值划分占比。
    </p>
    <el-table :data="tableData" border>
      <el-table-column
        prop="id"
        label="ID"
        min-width="50px"
        show-overflow-tooltip
      />
      <el-table-column
        prop="name"
        label="Name"
        min-width="50px"
        show-overflow-tooltip
      />
    </el-table>
  </div>
</template>

<script setup>
import { ref } from "vue";

const tableData = ref([
  { id: "1", name: "式打法是发撒打发", content: "大师傅撒撒发生范德萨发" },
  { id: 2, name: "式打法是发撒打发", content: "sdf asf大师傅撒撒发生范德萨发" },
]);
</script>

<style scoped lang="scss">
.table-container {
  background: #fff;
  padding: 15px;
  .title {
    font-size: 12px;
  }
}
</style>
